/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cloudsim;

import org.cloudbus.cloudsim.power.models.scheduling.client.Report;
import sun.misc.Compare;
import sun.misc.Sort;

/**
 *
 * @author Marcio
 */
public class Main implements Compare{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        Report []rps = new Report[3];
        
        for(int i = 0; i < 3; i++){
            rps[i] = new Report();
            rps[i].setCost(i);
        }
        
        Main main = new Main();
        
        Sort.quicksort(rps, main);
        
        System.out.println(rps[0].getCost() + " " + rps[1].getCost() + " " + rps[2].getCost());
        
        
    }

    public int doCompare(Object o, Object o1) {
        Report r1 = (Report) o;
        Report r2 = (Report) o1;
        
        if(r1.getCost() < r2.getCost())
            return 1;
        else
        if(r1.getCost() > r2.getCost())
            return -1;
        else
            return 0;
    }

}
